<!DOCTYPE html>
<html style="width: 100%; height: 100%;">

<head>
  <meta charset="utf-8">
  <title>搜索引擎集合</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <script src="./layui/layui.js" charset="utf-8"></script>
  <script src="./cookie.js" charset="utf-8"></script>
  <link rel="stylesheet" href="./layui/css/layui.css" media="all">
</head>
<style>
body {
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
}
</style>

<body class="layui-bg-black">
  <!-- <div style="position:fixed; top: 0px; left: 0px; width: 100%; height: 100%; background-color:rgba(50,50,50,0.4);"></div> -->
  <br>
  <br>
  <form class="layui-form" action="" style="margin-top: 0%;">
    <div style="margin: 0px auto; width: 220px;">
      <img id="logo" src="./image/pngsucai_4723204_2c3048.png" style="width: 220px; visibility:hidden">
    </div>
    <br>
    <div class="layui-form-item">
      <div class="layui-input-block"  style="margin: 0px auto; width: 50%;">
        <input type="text" id="title" name="title" required lay-verify="required" placeholder="输入搜索内容" autocomplete="off" class="layui-input">
        <i id="chacha" class="layui-icon layui-icon-close" style="color:#666; position: absolute; font-size: 22px; right: 10px; top: 8px;" onclick="onClear()"></i>
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-input-block" style="margin: 0px auto; width: 50%;">
        <input type="radio" name="choose" value="baidu" title="百度" checked>
        <input type="radio" name="choose" value="bing" title="必应">
        <input type="radio" name="choose" value="google" title="谷歌">
        <input type="radio" name="choose" value="yandex" title="Yandex">
        <input type="radio" name="choose" value="magi" title="Magi">
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-input-block" style="margin: 0px auto; width: 100px;">
        <button class="layui-btn" lay-submit lay-filter="formDemo">立即搜索</button>
      </div>
    </div>
  </form>

  <img src="./image/pngsucai_3158394_b5a3e4.png" style="position:fixed; left: 20px; bottom: 20px; width: 40px; height: 40px;" onclick="window.location.href='./translation.html'">
  <img src="./image/bejson.png" style="position:fixed; left: 90px; bottom: 24px; width: 32px; height: 32px;" onclick="window.open('https://www.bejson.com/')">
  <img src="./image/pngsucai_2612251_2c4a58.png" style="position:fixed; right: 20px; bottom: 20px; width: 40px; height: 40px;" onclick="setBackground()">

  <script src="./backdrop.js" charset="utf-8"></script>
  <script src="./clear.js" charset="utf-8"></script>
  <script>
    layui.use('form', function () {
      var form = layui.form;
      //监听提交
      form.on('submit(formDemo)', function (data) {
        layer.msg("正在跳转");
        var txt = encodeURI(data.field.title);
        switch (data.field.choose) {
          case "baidu":
            setTimeout('window.open("https://www.baidu.com/s?wd='+txt+'");', 500);
            break;
          case "bing":
            setTimeout('window.open("https://cn.bing.com/search?q='+txt+'");', 500);
            break;
          case "google":
            setTimeout('window.open("https://www.google.com/search?q='+txt+'");', 500);
            break;
          case "yandex":
            setTimeout('window.open("https://yandex.com/search/?text='+txt+'");', 500);
            break;
          case "magi":
            setTimeout('window.open("https://magi.com/search?q='+txt+'");', 500);
            break;
          default:
            break;
        }
        return false;
      });
    });
  </script>
</body>

</html>